Skip to content

Add RHEL support and include Linux distro in cache keys#1323

Open
priyagupta108 wants to merge 5 commits into
actions:mainfrom
priyagupta108:add-rhel-support
Open

Add RHEL support and include Linux distro in cache keys#1323
priyagupta108 wants to merge 5 commits into
actions:mainfrom
priyagupta108:add-rhel-support

Conversation

@priyagupta108

Copy link
Copy Markdown
Contributor

Description:

  • Adds RHEL support for Python version resolution and installation.
  • Includes the Linux distro (version + name) in the cache keys and aligns them across pip, pipenv, and poetry.

Impact:
One-time cache regeneration for Linux pipenv/poetry users on the first run. Windows and macOS keys are unchanged.

Check list:

  • Mark if documentation changes are required.
  • Mark if tests were added or updated to cover the changes.

@priyagupta108 priyagupta108 requested a review from a team as a code owner June 17, 2026 06:14
Copilot AI review requested due to automatic review settings June 17, 2026 06:14
@priyagupta108 priyagupta108 self-assigned this Jun 17, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds RHEL-aware Python release resolution and standardizes Linux cache keys by incorporating Linux distro name + version across pip/pipenv/poetry (while keeping Windows/macOS keys unchanged).

Changes:

  • Add RHEL-specific manifest filtering during Python version resolution.
  • Add a shared getLinuxInfoKeySegment() helper and use it to include Linux distro info in pip/pipenv/poetry cache keys.
  • Make Linux distro detection more resilient by falling back from lsb_release to /etc/os-release.

Reviewed changes

Copilot reviewed 6 out of 8 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
src/utils.ts Adds fallback Linux distro detection via /etc/os-release when lsb_release fails.
src/install-python.ts Adds RHEL detection and custom manifest matching for platform: rhel.
src/cache-distributions/cache-distributor.ts Introduces shared Linux distro cache-key segment helper (incl. RHEL major-version logic).
src/cache-distributions/pip-cache.ts Switches pip cache keys to use the shared Linux distro key segment helper.
src/cache-distributions/pipenv-cache.ts Adds Linux distro segment to pipenv cache keys via shared helper.
src/cache-distributions/poetry-cache.ts Adds Linux distro segment to poetry cache keys via shared helper.
dist/setup/index.js Regenerated bundled output reflecting the source changes.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/utils.ts
Comment thread src/cache-distributions/cache-distributor.ts Outdated
Comment thread src/install-python.ts
Comment thread src/cache-distributions/pipenv-cache.ts
priya-kinthali
priya-kinthali previously approved these changes Jun 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants